﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Page/Site.Master" EnableEventValidation="true" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ERP.Page.Default" %>

<%@ Register Src="~/PageUC/Order-Buy-Uc.ascx" TagPrefix="uc1" TagName="OrderBuyUc" %>
<%@ Register Src="~/PageUC/OrderNewUc.ascx" TagPrefix="uc1" TagName="OrderNewUc" %>
<%@ Register Src="~/PageUC/QuotesUC.ascx" TagPrefix="uc1" TagName="QuotesUC" %>
<%@ Register Src="~/PageUC/ImportOrder.ascx" TagPrefix="uc1" TagName="ImportOrder" %>
<%@ Register Src="~/PageUC/TransactionUC.ascx" TagPrefix="uc1" TagName="TransactionUC" %>
<%@ Register Src="~/PageUC/branchUC.ascx" TagPrefix="uc1" TagName="branchUC" %>



<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script>
    function pageLoad() {
        //-------------------Tooltip-------------------
        Tooltip('.btn');
        Tooltip('.text-num-order');
        Tooltip('.note');

            //------------Order-Buy------------------
        PopupUpdateHeight('#orderbuy');
        //PopupUpdate('#order');
        PopupUpdate('#materials');
        PopupUpdate('#customer');
        PopupUpdateHeight('#detailmaterials');
            //-------------Kết-Thúc--------------------

            //---------Import-Order----------------
        PopupUpdateHeight('#importorder');
        PopupUpdate('#importmaterials');
        PopupUpdateHeight('#orderimportdetail');
            TableSort('#MyTableListViewAllOrder', 'pagerMyTableListViewAllOrder')
        //-------------Kết-Thúc----------------------

            //-----------Order------------------
        PopupUpdateHeight('#orderusercontrol');
        PopupUpdate('#materialorder');
        PopupUpdate('#customerorder');
        PopupUpdateHeight('#detailmaterialsorder');
        //-------------Kết-Thúc----------------------

            //--------Order-Buy---------------
            TableSort('#MyTable', '.pager');
            TableSort('#MyTableMaterials', '.pagerMyTableMaterials');
            TableSort('#MyTableOrderDetail', '.pagerMyTableOrderDetail');
            TableSort('#MyTableCustomer', '.pagerMyTableCustomer');
            TableSort('#MyTableOrder', '.pagerMyTableOrder');
            TableSort('#MyTableMaterialsOrder', '.pagerMyTableMaterialsOrder');
            TableSort('#MyTableCustomerOrder', '.pagerMyTableCustomerOrder');
        //-------------Kết-Thúc----------------------

        //----------------Quotes-------------------
        PopupUpdate('#baogia');
            TableSort('#MyTableQuotes', '.pagerMyTableQuotes');
            TableSort('#MyTableQuotesProduct', '.pagerMyTableQuotesProduct');
        //-----------------END-----------------------

            //--------------------Transaction--------------------
            function Radio() {
                $('.ChildCheck2 input[type="radio"]').each(function () {
                    if ($(this).is(':checked')) {
                        $(this).parent().find('input[type="text"]').prop("disabled", false);
                    } else {
                        $(this).parent().find('input[type="text"]').prop("disabled", true);
                    }
                });
            }
            PopupUpdate('#giaodich'); 
            TableSort('#MyTableTransaction', '.pagerMyTableTransaction');
            $("input[name='" + $('#<%=TransactionUC.rdbSanPhamDangDung.ClientID %>').attr('name') + "']:radio").change(function () {
                Radio();
            });
            //--------------------End--------------------

            //--------------------Branch--------------------
            PopupUpdate('#chinhanh');
            TableSort('#MyTableBranch', '.MyTableBranch');
            //--------------------End-----------------------

        //--------------------DatePicker--------------------
        DatePicker('.textbox_child_text_ngay');
            DateTimePicker('.textbox_child_text_ngay_thoigian');
        MarkInputDay('.textbox_child_text_ngay');
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div id="tabs">
    <ul class="tabs-title">
            <%-- ........................................ --%>
        <li class="removetabs">
            <a href="#tabdonmuahang">Đơn mua hàng</a>
            <a href="#" class="close">x</a>
        </li>

        <li class="removetabs">
            <a href="#tabmuahang">Mua hang</a>
            <a href="#" class="close">x</a>
        </li>

            <%-- ........................................ --%>
            <li class="removetabs">
                <a href="#tabphieunhapkho">Phiếu nhập kho</a>
                <a href="#" class="close">x</a>
            </li>

            <%-- ........................................ --%>
            <li class="removetabs">
                <a href="#tabchinhanh">Chi nhánh</a>
                <a href="#" class="close">x</a>
            </li>
            <li class="removetabs">
                <a href="#tabphongchua">Phòng chứa</a>
                <a href="#" class="close">x</a>
            </li>
            <li class="removetabs">
                <a href="#tabkho">Kho</a>
                <a href="#" class="close">x</a>
            </li>
            <li class="removetabs">
                <a href="#tabdonvitinh">Đơn vị tính</a>
                <a href="#" class="close">x</a>
            </li>
            <li class="removetabs">
                <a href="#tabnhomvattu">Nhóm vật tư</a>
                <a href="#" class="close">x</a>
            </li>
            <li class="removetabs">
                <a href="#tabvattu">Vật tư</a>
                <a href="#" class="close">x</a>
            </li>

            <%-- ........................................ --%>
        <li class="removetabs">
                <a href="#tabgiaodich">Giao dịch</a>
            <a href="#" class="close">x</a>
        </li>

        <li class="removetabs">
                <a href="#tabbaogia">Báo giá</a>
            <a href="#" class="close">x</a>
        </li>
    </ul>

    <div class="product-collateral">
        <div class="box-collateral box-description">
                <%--__________________Mua hàng_____________--%>
            <div class="removetabs" id="tabdonmuahang">
                <uc1:OrderNewUc runat="server" ID="OrderNewUc" />
            </div>
            <div class="removetabs" id="tabmuahang">
                <uc1:OrderBuyUc runat="server" ID="OrderBuyUc" />
            </div>
                <%--__________________End__________________--%>

                <%--__________________Quan Ly Kho__________--%>
                <div class="removetabs" id="tabgiaodich">
                    <uc1:TransactionUC runat="server" ID="TransactionUC" />
                </div>
                <%--__________________End__________________--%>

                <%--__________________Tu Dien Kho_____________--%>
                <div class="removetabs" id="tabchinhanh">
                    <uc1:branchUC runat="server" ID="branchUC" />
                </div>
                <div class="removetabs" id="tabphongchua">
                </div>
                <div class="removetabs" id="tabkho">
                </div>
                <div class="removetabs" id="tabdonvitinh">
                </div>
                <div class="removetabs" id="tabnhomvattu">
                </div>
                <div class="removetabs" id="tabvattu">
                </div>
                <%--__________________End__________________--%>

                <%--__________________Khach hang___________--%>
            <div class="removetabs" id="tabbaogia">
                <uc1:QuotesUC runat="server" ID="QuotesUC" />
            </div>
            <div class="removetabs" id="tabphieunhapkho">
                <uc1:ImportOrder runat="server" ID="ImportOrder" />
            </div>
                <%--__________________End__________________--%>
        </div>
    </div>
</div>
</asp:Content>